The invention is generally directed to computer or data processing systems, and more particularly is directed to user-interfaces for such computer or data processing systems.
For various computer systems and networked computer systems, there are commands, for example unix commands (usually small programs)that produce plain ASCII text as output. These commands typically write their output to a generic file or file descriptor within a program, for example stdout for the unix system. For the example of Stdout, this may be a reference to a user""s terminal window, computer network browser window or the like, which would cause the output to be displayed in that terminal or browser window. Alternatively, Stdout may be a reference to a named file on the filesystem, or it may be a reference to a pipe which would cause the output text to become the input of another command.
It is important that these text producing programs are able to output only plain text because, as just stated, their output may become the input of another program, and the second program expects and can process only plain ASCII text as its input. Some of these text producing commands are Is, find, grep, od, whereis, who, whoami, xd, etc.
As explained above, plain text is necessary as input for other commands. However, when text is output to a terminal window for a user (human) to read and analyze, the human is more productive if that text is colored or highlighted in a sensible manner to aid the human in processing the information contained in the text. Most modern terminal windows are capable of interpreting and processing embedded control sequences and highlighting or coloring surrounding text according to these control sequences.
Unfortunately, the required control sequences vary depending upon the terminal window being used. For instance, to turn on red foreground, the hpterm terminal requires the sequence  less than Esc greater than andv1S, but the dtterm and color-xterm terminals require the sequence  less than Esc greater than [31m, where in both cases  less than Esc greater than  is the ASCII escape character (numbered 27 in decimal and 1b in hexadecimal).
To enable text producing commands to output both plain text and text with control sequences, a software provider could write two or more versions of each text producing command, one to output plain text only and the other(s)to output text with control sequences. Or the software provider could write a single version of the command with additional command line options to turn on or off the output of control sequences and to determine which group of control sequences to use.
However, both such schemes would place an additional burden upon the user. With the former scheme, the user would: i)have to know that two versions exist; ii) realize that he is or is not sending the output of the text producing command to another program; and iii) remember the correct command name, i. e. the name for the one that produces control sequences or the name for the one that doesn""t (depending on what he wants), and type the correct name.
Additionally, the former scheme is limited by requiring two or more versions of the command with nearly the same functionality. This results in increased disk space to store multiple versions of the command, and possibly more bugs or defects because the multiple versions, although very similar in functionality, may not share any source code.
With the latter scheme, the user would have to i) realize that he or she is not sending the output of the text producing command to another program, ii) remember what the command line options are to produce or not produce control sequences embedded in the output text (depending on what he or she wants), iii) remember the command option to select terminal window type he or she is currently using, and iiii) type the correct options.
Given these difficulties a single text producing program would ideally output only plain text when its output is going to a file or as input to another program, and would output the same plain text but with embedded control sequences that will provide display enhancements in the terminal window, for example, highlight and/or color the plain text, in a way meaningful to the user.
Furthermore, a single text producing command would ideally differentiate among terminal window types and output the correct control sequences for the terminal window being used.
What is needed is an automated method and apparatus for determining an extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements.
The invention provides an automated method and apparatus for determining the extent of user-interface enhancement capabilities available to a user, and for providing appropriate control signals to employ such user-interface enhancements.
If information is presented employing user-interface enhancement capabilities, for example capabilities for coloring or highlighting selected text in a sensible manner, then the information is more understandable and more easily read and analyzed, and accordingly the user is more productive. The invention advantageously provides for automatic employment of such capabilities without burdening the user.
Briefly, and in general terms the invention includes providing a computer coupled with a user-interface, and automatically determining the extent of available enhancement capabilities of the user-interface. The invention generates control signals to employ the enhancements within the extent, and transmits the control signals from the computer to the user-interface.
Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.